#!/bin/bash

cd /home/a/fastlio2_ws/
source devel/setup.bash 
{
gnome-terminal -t "termin1" -x bash -c "roslaunch fast_lio mapping_mid360.launch"
}&
sleep 2s

cd /home/a/
{
gnome-terminal -t "termin2" -x bash -c "roslaunch mavros px4.launch"
}&
sleep 3s
{
gnome-terminal -t "termin3" -x bash -c "rosrun mavros mavcmd long 511 105 5000 0 0 0 0 0"
}&
sleep 1s
{
gnome-terminal -t "termin3" -x bash -c "rosrun mavros mavcmd long 511 31 5000 0 0 0 0 0"
}&
sleep 1s

cd /home/a/ws_livox/
source devel/setup.bash 
{
gnome-terminal -t "termin4" -x bash -c "roslaunch livox_ros_driver2 msg_MID360.launch" 
}

sleep 3s
cd /home/a/Fast-Drone-250
source devel/setup.bash 
{
gnome-terminal -t "termin5" -x bash -c "roslaunch px4ctrl run_ctrl_high_freq.launch" 
}

sleep 1s
cd /home/a/Fast-Drone-250
source devel/setup.bash 
{
gnome-terminal -t "termin6" -x bash -c "roslaunch ego_planner single_run_in_exp.launch" 
}&
sleep 2s

cd /home/a/Fast-Drone-250
source devel/setup.bash 
{
gnome-terminal -t "termin7" -x bash -c "roslaunch ego_planner rviz.launch" 
}
